package com.objectproject.main.dao.mybatis.mapper.hierarchy;

import java.util.ArrayList;

import org.apache.ibatis.annotations.Param;

import com.objectproject.main.model.MyObject;

public interface MyObjectHierarchyMapper {
	public abstract ArrayList<Long> selectSuperObjectIds(long objectId);
	public abstract ArrayList<Long> selectSubObjectIds(long objectId);
	public abstract ArrayList<MyObject> selectSuperObjects(long objectId);
	public abstract ArrayList<MyObject> selectSubObjects(long objectId);
	public abstract void insertHierarchy(@Param("objectId")long objectId, @Param("superObjectId")long superObject);
	public abstract void deleteHierarchy(@Param("objectId")long objectId, @Param("superObjectId")long superObject);

	//advanced
	public abstract ArrayList<Long> selectAncestorObjectIds(long objectId);
	public abstract ArrayList<Long> selectDescendantObjectIds(long objectId);
	public abstract ArrayList<Long> selectLeafObjectIds(long objectId);
	public abstract ArrayList<Long> selectFianlObjectIds(long objectId);
	public abstract ArrayList<Long> selectInterfaceObjectIds(long objectId);

	public abstract ArrayList<MyObject> selectAncestorObjects(long objectId);
	public abstract ArrayList<MyObject> selectDescendantObjects(long objectId);
	public abstract ArrayList<MyObject> selectLeafObjects(long objectId);
	public abstract ArrayList<MyObject> selectFianlObjects(long objectId);
	public abstract ArrayList<MyObject> selectInterfaceObjects(long objectId);
	
}
